<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="org.test.once.model.Role"%>
<%
	List<Role> roles = (List<Role>)request.getAttribute("roles");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>角色信息</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="../style/oa.css" rel="stylesheet" type="text/css">
	<script language="javascript" src="script/public.js">
	</script>

  </head>
  
  <body>
  <BODY bgColor=#ffffff leftMargin=0 background="" topMargin=0 marginheight="0" marginwidth="0">
<center>
      <TABLE width="1200" border=0 align=center cellPadding=0 cellSpacing=0 borderColor=#ffffff style="FONT-SIZE: 10pt">
        <TBODY>
          <TR>
            <TD width="82%" height=14 align=right vAlign=center noWrap>
            </TD>
            <TD width="18%" align=right vAlign=center noWrap>　</TD>
          </TR>
          <TR>
            <TD height=14 align=right vAlign=center noWrap>
            	<!-- 在这里插入查询表单 -->
            </TD>
            <TD height=14 align="left" vAlign=center noWrap>
            </TD>
          </TR>
          <TR>
            <TD height=28 colspan="1" align=right vAlign=center noWrap background=images/list_middle.jpg style="width: 1000px; ">
            <a href="#" onclick="openWin('role/add_info.jsp?','chgpsw', 740, 300);">添加用户</a>
            </TD>
          </TR>
        </TBODY>
      </TABLE>
      <table width="100%" border="0" cellPadding="0" cellSpacing="1" bgcolor="#6386d6">
          <!-- 列表标题栏 -->
	      <tr bgcolor="EFF3F7" class="TableBody1">
		      <td width="10%" height="37" align="center"><b>序号</b></td>
		      <td width="10%" height="37" align="center"><B>姓名</B></td>
		    <!--   <td width="10%" height="37" align="center"><B>角色授权</B></td> -->
              <td width="20%" height="37" align="center"><b>操作</b></td>
          </tr>
          <!-- 列表数据栏 -->
          
          <%if(!roles.isEmpty()) {%>
          <%for(Role role : roles)  {%>
          
           <tr bgcolor="#EFF3F7" class="TableBody1" onmouseover="this.bgColor = '#DEE7FF';" onmouseout="this.bgColor='#EFF3F7';">
		      <td align="center" vAlign="center"><%=role.getId() %></td>
	          <td align="center" vAlign="center"><%=role.getName() %></td>
	         
	          <td align="center" vAlign="center">
	          <a href="#" onclick="del('RoleServlet?oder=delRole&roleid=<%=role.getId()%>');">删除角色</a>
	          <a href="#" onclick="openWin('RoleServlet?order=update&roleid=<%=role.getId() %>','chgpsw', 740, 400);">修改角色</a>
	           <a href="#" onclick="openWin('ModuleServlet?command=search&roleid=<%=role.getId() %>','chgpsw', 740, 400);">角色授权</a>
	           
	          </td>
        	</tr>
	    <tr>
	     
        <%} %>
		<%} %>
        <!-- 在列表数据为空的时候，要显示的提示信息 -->
	    <%if(roles.isEmpty()) {%>
	    	<td colspan="7" align="center" bgcolor="#EFF3F7" class="TableBody1" onmouseover="this.bgColor = '#DEE7FF';" onmouseout="this.bgColor='#EFF3F7';">
	    	没有找到相应的记录
	    	</td>
	    </tr>
	    <%} %>
      </table>
</center>
    
  </body>
</html>
